package epam.com.study.xml.runner;

import java.io.File;
import java.io.FileNotFoundException;

import javax.xml.bind.JAXBException;
import javax.xml.bind.ParseConversionEvent;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import epam.com.study.xml.classes.ListOfStones;
import epam.com.study.xml.classes.ParserDOM;
import epam.com.study.xml.classes.LoadStonesSAX;
import epam.com.study.xml.classes.ParserSAX;
import epam.com.study.xml.classes.Stone;

public class Runner {

	public static void main(String[] args) throws JAXBException, FileNotFoundException {

		// DOM
		/*
		ListOfStones listOfStones = LoadStones
				.loadDOM("src/main/resources/Jewel.xml");
*/
		//SAX
		ListOfStones listOfStones = ParserSAX.loadSAX("src/main/resources/Jewel.xml");
		
		//JAXB
/*
		ListOfStones listOfStones = LoadStones.loadJAXB("src/main/resources/Jewel2.xml");
	*/
		
		for (Stone stone : listOfStones.getList()) {
			stone.toPrint();
		}
		

	}

}
